﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using KAKA.Domain;

namespace KAKA.Models
{
    public class EventModel
    {
        public string Id { get; set; }
        [Required, Display(Name = "标题")]
        public string Title { get; set; }
        [Display(Name = "描述")]
        public string Description { get; set; }
        [Display(Name = "内容")]
        public string Content { get; set; }
        [Display(Name = "摘要"), StringLength(500)]
        public string Summary { get; set; }
        [Display(Name = "活动特色")]
        public string Feature { get; set; }
        [Required, Display(Name = "类别")]
        public string Category { get; set; }
        [Display(Name = "活动时间"), DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:yyyy-MM-dd}")]
        public string ActAt { get; set; }
        [Display(Name = "活动地点")]
        public string Locale { get; set; }
        [Display(Name = "活动人群")]
        public string Audience { get; set; }
        [Display(Name = "备注")]
        public string Remark { get; set; }
        [Display(Name = "费用"), DisplayFormat(DataFormatString = "{0:#.00}")]
        public decimal Charge { get; set; }
        public int Visits { get; set; }
        public string Cover { get; set; }
        public EventStatus Status { get; set; }

        public bool Signed { get; set; }
        public int SlateAmount { get; set; }

        public bool IsHidden { get; set; }
        public bool IsClosed { get; set; }
    }

    public class EventCoverModel
    {
        public string Id { get; set; }
        public string CoverPath { get; set; }
    }

    public class EventPhotographModel
    {
        public string Id { get; set; }
        [Required, Display(Name = "标题")]
        public string Caption { get; set; }
        public string Path { get; set; }
    }

    public class EventRetrospectModel
    {
        public string Id { get; set; }
        public string Title { get; set; }
        public string RetrospectHTML { get; set; }
        public bool IsHidden { get; set; }
        public bool IsClosed { get; set; }
        public List<EventPhotographModel> Photographs { get; set; }
    }

    public class EventSlateModel
    {
        public string Id { get; set; }
        public string Name { get; set; }
        public IEnumerable<EventSlateMemberModel> Members { get; set; }
    }

    public class EventSlateMemberModel
    {
        public string Id { get; set; }
        public string Name { get; set; }
        public bool Paid { get; set; }
        public decimal Charge { get; set; }
    }

    public class EventEditRetrospectModel
    {
        public string Id { get; set; }

        public string Title { get; set; }
        [Display(Name = "标题")]
        public string Caption { get; set; }
        [Display(Name = "活动回顾")]
        public string Retrospect { get; set; }
        public List<EventPhotographModel> Photographs { get; set; }
    }
}